package com.gxa.usermanagement.service.impl;

import com.gxa.common.R;
import com.gxa.common.entity.usermange.Deliveryman;
import com.gxa.usermanagement.mapper.DaYiJiMapper;
import com.gxa.usermanagement.mapper.DeliverymanMapper;
import com.gxa.usermanagement.service.DeliverymanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeliverymanServiceImpl implements DeliverymanService {

    @Autowired
    private DeliverymanMapper deliverymanMapper;
    @Override
    public R findDeliverymanService(Integer currentPage, Integer pageSize) {
        R r = new R();
        Integer start = (currentPage-1)*pageSize;
        Integer off = pageSize;
        List<Deliveryman> deliverymanMapper = this.deliverymanMapper.findDeliverymanMapper(start, off);
        r.setData(deliverymanMapper);
        r.setMessage("查询成功");
        r.setCode(200);
        return r;
    }
}
